/* $Id: GameMapModel.java 63 2010-02-14 13:52:34Z aaron.day $ */
package org.crazydays.gameplan.map.swing;


import org.crazydays.gameplan.map.GameMap;

/**
 * GameMapModel
 */
public class GameMapModel
{
    /** game map */
    protected GameMap gameMap;

    /** name document listener */
    protected NameDocumentListener nameDocumentListener;

    /** geometry model */
    protected GeometryModel geometryModel;

    /**
     * Set game map model.
     * 
     * @param gameMap GameMap
     */
    public GameMapModel(GameMap gameMap)
    {
        this.gameMap = gameMap;
        this.nameDocumentListener = new NameDocumentListener(gameMap);
        this.geometryModel = new GeometryModel(gameMap.getGeometry());
    }

    /**
     * Get name action listener.
     * 
     * @return NameDocumentListener
     */
    public NameDocumentListener getNameDocumentListener()
    {
        return nameDocumentListener;
    }

    /**
     * Get geometry model.
     * 
     * @return GeometryModel
     */
    public GeometryModel getGeometryModel()
    {
        return geometryModel;
    }
}
